const schemas = {
  "addCaseDemand": {
    "responses": {
      "200": {
        "type": "object",
        "properties": {
          "optResult": {
            "type": "number",
            "description": "值为0，操作成功"
          },
          "msg": {
            "type": "string",
            "description": "操作失败说明"
          }
        },
        "required": [
          "optResult"
        ],
        "$schema": "http://json-schema.org/draft-04/schema#"
      }
    }
  },
  "getListDemand": {
    "responses": {
      "200": {
        "type": "object",
        "properties": {
          "optResult": {
            "type": "number",
            "description": "值为0，操作成功"
          },
          "msg": {
            "type": "string",
            "description": "操作失败说明"
          },
          "totalDataCount": {
            "description": "总记录数",
            "type": "number"
          },
          "demands": {
            "description": "需求列表",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "需求ID"
                },
                "name": {
                  "type": "string",
                  "description": "需求名称"
                },
                "level": {
                  "type": "number",
                  "description": "重要级别，可取值：\n0-重要，1-较重要，2-普通"
                },
                "demandOpenId": {
                  "type": "string",
                  "description": "统一需求ID"
                },
                "description": {
                  "type": "string",
                  "description": "描述"
                },
                "hasAdd": {
                  "type": "number",
                  "description": "是否已添加为用例树结点，可取值：\n0-未添加，1-已添加"
                }
              },
              "required": [
                "id",
                "name",
                "level",
                "demandOpenId",
                "description",
                "hasAdd"
              ]
            }
          }
        },
        "required": [
          "optResult",
          "totalDataCount",
          "demands"
        ],
        "$schema": "http://json-schema.org/draft-04/schema#"
      }
    }
  },
  "addCase": {
    "responses": {
      "200": {
        "type": "object",
        "properties": {
          "optResult": {
            "type": "number",
            "description": "值为0，操作成功"
          },
          "msg": {
            "type": "string",
            "description": "操作失败说明"
          }
        },
        "required": [
          "optResult"
        ],
        "$schema": "http://json-schema.org/draft-04/schema#"
      }
    }
  },
  "getListCasetree": {
    "responses": {
      "200": {
        "type": "object",
        "properties": {
          "optResult": {
            "type": "number",
            "description": "值为0，操作成功"
          },
          "msg": {
            "type": "string",
            "description": "操作失败说明"
          },
          "totalDataCount": {
            "type": "string",
            "description": "总记录数"
          },
          "caseTree": {
            "description": "用例树结点列表",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "需求/用例ID"
                },
                "name": {
                  "type": "string",
                  "description": "需求/用例名称"
                },
                "type": {
                  "type": "number",
                  "description": "结点类型，可取值：\n1-需求项，2-用例项，3-无需求项"
                },
                "caseType": {
                  "type": "string",
                  "description": "用例类型，仅当type=2时有值，可取值：\nflowchart - 图形流\njava - 用户上传java代码\njmeter - 用户上传jmeter脚本\nrf - 用户上传rf脚本"
                },
                "target": {
                  "type": "string",
                  "description": "目标脚本类型，仅当type=2时有值，可取值：jmeter、rf"
                },
                "status": {
                  "type": "string",
                  "description": "编译状态，仅当type=2时有值，可取值：\nnotcompile - 未编译\ncompiling - 正在编译\ncompiled - 已编译\ncompilefail - 编译失败\nnorequired - 无需编译"
                },
                "createTime": {
                  "type": "string",
                  "description": "创建日期，仅当type=2时有值"
                },
                "updateTime": {
                  "type": "string",
                  "description": "最新修改日期，仅当type=2时有值"
                },
                "updateUser": {
                  "type": "string",
                  "description": "最新修改人，仅当type=2时有值"
                },
                "children": {
                  "type": "array",
                  "description": "子结点列表，仅当type=1或3时有值",
                  "items": {
                    "type": "object"
                  }
                }
              },
              "required": [
                "id",
                "name",
                "type"
              ]
            }
          }
        },
        "required": [
          "optResult",
          "totalDataCount",
          "caseTree"
        ],
        "$schema": "http://json-schema.org/draft-04/schema#"
      }
    }
  },
  "deleteCasetreeNode": {
    "responses": {
      "200": {
        "type": "object",
        "properties": {
          "optResult": {
            "type": "number",
            "description": "值为0，操作成功"
          },
          "msg": {
            "type": "string",
            "description": "操作失败说明"
          }
        },
        "required": [
          "optResult"
        ],
        "$schema": "http://json-schema.org/draft-04/schema#"
      }
    }
  },
  "uploadScript": {
    "responses": {
      "200": {
        "type": "object",
        "properties": {
          "optResult": {
            "type": "number",
            "description": "值为0，操作成功"
          },
          "msg": {
            "type": "string",
            "description": "操作失败说明"
          }
        },
        "required": [
          "optResult"
        ],
        "$schema": "http://json-schema.org/draft-04/schema#"
      }
    }
  },
  "downloadScript": {
    "responses": {
      "200": {
        "type": "object",
        "properties": {
          "optResult": {
            "type": "number",
            "description": "值为0，操作成功"
          },
          "msg": {
            "type": "string",
            "description": "操作失败说明"
          },
          "File": {
            "type": "string",
            "description": "jmx/robot脚本文件或zip代码压缩包"
          }
        },
        "required": [
          "optResult",
          "File"
        ],
        "$schema": "http://json-schema.org/draft-04/schema#"
      }
    }
  },
  "uploadTemplate": {
    "responses": {
      "200": {
        "type": "object",
        "properties": {
          "optResult": {
            "type": "number",
            "description": "值为0，操作成功"
          },
          "msg": {
            "type": "string",
            "description": "操作失败说明"
          }
        },
        "required": [
          "optResult"
        ],
        "$schema": "http://json-schema.org/draft-04/schema#"
      }
    }
  },
  "downloadTemplate": {
    "responses": {
      "200": {
        "type": "object",
        "properties": {
          "optResult": {
            "type": "number",
            "description": "值为0，操作成功"
          },
          "msg": {
            "type": "string",
            "description": "操作失败说明"
          },
          "File": {
            "type": "string",
            "description": "jmx/robot脚本文件或zip代码压缩包"
          }
        },
        "required": [
          "optResult",
          "File"
        ],
        "$schema": "http://json-schema.org/draft-04/schema#"
      }
    }
  },
  "doCompile": {
    "responses": {
      "200": {
        "type": "object",
        "properties": {
          "optResult": {
            "type": "number",
            "description": "值为0，操作成功"
          },
          "msg": {
            "type": "string",
            "description": "操作失败说明"
          }
        },
        "required": [
          "optResult"
        ],
        "$schema": "http://json-schema.org/draft-04/schema#"
      }
    }
  },
  "getCompileRecords": {
    "responses": {
      "200": {
        "type": "object",
        "properties": {
          "optResult": {
            "description": "值为0，操作成功",
            "type": "number"
          },
          "msg": {
            "type": "string",
            "description": "操作失败说明"
          },
          "totalDataCount": {
            "description": "总记录数",
            "type": "number"
          },
          "records": {
            "type": "array",
            "description": "编译记录列表",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "记录ID，对应Mongo主键"
                },
                "compileFor": {
                  "type": "string",
                  "description": "编译起因，可取值：\nRestAPIChange – 用户修改RestAPI\nUserCompile – 用户点击编译"
                },
                "result": {
                  "type": "string",
                  "description": "编译结果，可取值：\nsuccess – 成功\nfail – 失败\ncompiling – 编译中"
                },
                "compileTime": {
                  "type": "string",
                  "description": "编译时间"
                },
                "events": {
                  "type": "array",
                  "description": "编译记录的事件列表",
                  "items": {
                    "type": "object",
                    "properties": {
                      "content": {
                        "type": "string",
                        "description": "事件内容，比如：java代码编译完成、jmx编译完成、rf编译失败，失败原因：xxx"
                      },
                      "eventTime": {
                        "type": "string",
                        "description": "事件时间"
                      }
                    },
                    "required": [
                      "content",
                      "eventTime"
                    ]
                  }
                }
              },
              "required": [
                "id",
                "compileFor",
                "result",
                "compileTime",
                "events"
              ]
            }
          }
        },
        "required": [
          "optResult",
          "totalDataCount",
          "records"
        ],
        "$schema": "http://json-schema.org/draft-04/schema#"
      }
    }
  }
}

export default schemas;
